package com.base.data.message
{
	import com.base.util.Utils;
	
	import mx.collections.ArrayCollection;

	/**
	 * 产权信息
	 * @author Administrator
	 */	
	public class HousePropertyRight
	{
		/**
		 *产权年限 
		 */		
		[Bindable]
		public static var PropertyRightAge:ArrayCollection  =  new ArrayCollection([
				{label:"70年产权",data:70}
				,{label:"50年产权",data:50}
				,{label:"40年产权",data:40}
			]);
		
		
		/**
		 *产权类型
		 */		
		[Bindable]
		public static var PropertyRightType:ArrayCollection  =  new ArrayCollection([
				 {label:"商品房",data:1 }
				,{label:"商住两用",data:2 }
				,{label:"经济适用房",data:3 }
				,{label:"使用权",data:4 }
				,{label:"公房",data:5 }
			]);

		
		/**
		 *产权年限  PropertyRightAge
		 */
		private var _propertyRightAge:int;
		/**
		 *产权类型 PropertyRightType
		 */		
		private var _propertyRightType:int;
		/**
		 *建筑年代 
		 */
		private var _buildTime:Number;
		/**
		 * 
		 * @param age 产权年限 PropertyRightAge
		 * @param type	产权类型 PropertyRightType
		 * @param buildTime	建筑年代
		 */		
		public function HousePropertyRight()
		{
			
		}

		/**
		 *产权年限  PropertyRightAge
		 */
		public function get propertyRightAge():int
		{
			return _propertyRightAge;
		}

		/**
		 *产权年限  PropertyRightAge
		 */
		public function set propertyRightAge(value:int):void
		{
			var item:Object = Utils.findDataByArray( PropertyRightAge , value );
			if( !item ) {
				throw new Error("请输入正确的产权年限");
				return;
			}
			_propertyRightAge = value;
		}

		/**
		 *产权类型 PropertyRightType
		 */
		public function get propertyRightType():int
		{
			return _propertyRightType;
		}

		/**
		 *产权类型 PropertyRightType
		 */		
		public function set propertyRightType(value:int):void
		{
			var item:Object = Utils.findDataByArray( PropertyRightType , value );
			if( !item ) {
				throw new Error("请输入正确的产权类型");
				return;
			}
			_propertyRightType = value;
		}

		/**
		 *建筑年代 
		 */
		public function get buildTime():Number
		{
			return _buildTime;
		}

		/**
		 *建筑年代 
		 */
		public function set buildTime(value:Number):void
		{
			_buildTime = value;
		}


	}
}